import { createRequestTypes } from '@UTILS/reduxHelper'
export const GET_TEMPLATE_AND_PACKS = createRequestTypes('GET_TEMPLATE_AND_PACKS')
export const GET_TEMPLATE_OPTIONS_DETAIL = createRequestTypes('GET_TEMPLATE_OPTIONS_DETAIL')
export const GET_SERVICE_PACK_DETAIL = createRequestTypes('GET_SERVICE_PACK_DETAIL')
export const SET_SELECT_PATIENT = createRequestTypes('SET_SELECT_PATIENT')
export const SET_SELECT_DOCTOR = createRequestTypes('SET_SELECT_DOCTOR')
export const SET_SERVICE_PACK = createRequestTypes('SET_SERVICE_PACK')
export const UPDATE_START_SURVEY = createRequestTypes('UPDATE_START_SURVEY')
export const SYNC_LATEST_PACK = createRequestTypes('SYNC_LATEST_PACK')
export const GET_ORDER_PACKS = createRequestTypes('GET_ORDER_PACKS')

export default {
  dispatchGetTemplatesAndPacks(payload) {
    return {
      type: GET_TEMPLATE_AND_PACKS.REQUEST,
      payload
    }
  },
  dispatchGetTemplateOptionsDetail(payload) {
    return {
      type: GET_TEMPLATE_OPTIONS_DETAIL.REQUEST,
      payload
    }
  },
  dispatchGetServicePackDetail(payload) {
    return {
      type: GET_SERVICE_PACK_DETAIL.REQUEST,
      payload
    }
  },
  dispatchSelectPatients(payload) {
    return {
      type: SET_SELECT_PATIENT.REQUEST,
      payload
    }
  },
  dispatchSetSelectDoctor(payload) {
    return {
      type: SET_SELECT_DOCTOR.REQUEST,
      payload
    }
  },
  dispatchUpdateStartSurvey(payload) {
    return {
      type: UPDATE_START_SURVEY.REQUEST,
      payload
    }
  },
  dispatchSyncLatestPack(payload) {
    return {
      type: SYNC_LATEST_PACK.REQUEST,
      payload
    }
  },
  dispatchSetServicePack(payload) {
    return {
      type: SET_SERVICE_PACK.REQUEST,
      data: payload
    }
  },
  dispatchGetOrderPacks(payload) {
    return {
      type: GET_ORDER_PACKS.REQUEST,
      payload
    }
  },
}
